import { fromJS } from 'immutable'
import { actionTypes } from '../store'

const defaultState= fromJS({
    login:false
});
export default  (state = defaultState,action)=>{
    switch (action.type){
        case actionTypes.LOGIN:
            return state.set('login',true);
        case actionTypes.LOGOUT:
            return state.set('login',false);
        default:
            return state;
    }
};